package com.shuoyue.ycgk.ui.questionbank.practice.specialtraining;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseViewHolder;
import com.shuoyue.ycgk.R;
import com.shuoyue.ycgk.base.baseadapter.AppBaseQuickAdapter;
import com.shuoyue.ycgk.ui.questionbank.CountInfoBean;
import com.shuoyue.ycgk.utils.TimeFomatUtil;

import java.util.List;

public class QuestionSpecialInfoAdapter extends AppBaseQuickAdapter<CountInfoBean> {
    public QuestionSpecialInfoAdapter(@Nullable List<CountInfoBean> data) {
        super(R.layout.item_question_count_info, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, CountInfoBean item) {
        helper.setText(R.id.title, item.getTypeStr() + "");
        helper.setText(R.id.right_num, item.getRightQuestion() + "");
        helper.setText(R.id.total_num, item.getTotalQuestion() + "");
        helper.setText(R.id.use_time, TimeFomatUtil.formatmmss((int) item.getTimeMul() / 1000));
        helper.setText(R.id.right_rate, item.getRightQuestion()*100 / item.getTotalQuestion() + "");

    }


}
